package org.csu.softwaremetrics_demo.service.impl.java;

import org.csu.softwaremetrics_demo.entity.entry.Tradition;
import org.csu.softwaremetrics_demo.entity.result.impl.TraditionMetricResult;
import org.csu.softwaremetrics_demo.service.JavaCodeMetricService;
import org.springframework.stereotype.Service;

import java.io.File;

/**
 * @Description: 传统度量服务类
 * @Author: Jukomu
 * @Package: org.csu.softwaremetrics_demo.service
 * @Project: SoftwareMetrics_demo
 * @name: TraditionMetricService
 * @Date: 2025/4/6-20:46
 * @Filename: TraditionMetricService
 */
@Service
public class TraditionMetricService implements JavaCodeMetricService<TraditionMetricResult> {
    private Tradition tradition = new Tradition();
    @Override
    public TraditionMetricResult calculate(File file) {
        return tradition.calculate(file.getPath());
    }
}
